﻿namespace Microsoft.WowAddonStudio.Lua.Parser
{
    public interface IParserSink
    {
        int Line { get; }
        int Column { get; }

        bool BraceMatching { get; }
        bool FindNames { get; }
        bool HiddenRegions { get; }
        bool MethodParameters { get; }
        bool ProcessHiddenRegions { get; set; }
        bool FoundMatchingBrace { get; set; }

        /// <summary>
        /// Warnings the specified location.
        /// </summary>
        /// <param name="location">The location.</param>
        /// <param name="message">The message.</param>
        void AddWarning(LexLocation location, string message);

        /// <summary>
        /// Errors the specified location.
        /// </summary>
        /// <param name="location">The location.</param>
        /// <param name="message">The message.</param>
        void AddError(LexLocation location, string message);

        /// <summary>
        /// Matches the specified left.
        /// </summary>
        /// <param name="left">The left.</param>
        /// <param name="right">The right.</param>
        void MatchPair(LexLocation left, LexLocation right);

        /// <summary>
        /// Regions the specified location.
        /// </summary>
        /// <param name="location">The location.</param>
        void AddHiddenRegion(LexLocation location);

        /// <summary>
        /// Starts the name.
        /// </summary>
        /// <param name="location">The location.</param>
        /// <param name="name">The name.</param>
        void StartName(LexLocation location, string name);

        /// <summary>
        /// Qualifies the name.
        /// </summary>
        /// <param name="selectorLocation">The selector location.</param>
        /// <param name="nameLocation">The name location.</param>
        /// <param name="name">The name.</param>
        void QualifyName(LexLocation selectorLocation, LexLocation nameLocation, string name);

        /// <summary>
        /// Starts the parameters.
        /// </summary>
        /// <param name="location">The location.</param>
        void StartParameters(LexLocation location);

        /// <summary>
        /// Parameters the specified location.
        /// </summary>
        /// <param name="location">The location.</param>
        void NextParameter(LexLocation location);

        /// <summary>
        /// Ends the parameters.
        /// </summary>
        /// <param name="location">The location.</param>
        void EndParameters(LexLocation location);
    }
}
